<?php
$link = @mysql_connect(SAE_MYSQL_HOST_M.':'.SAE_MYSQL_PORT,SAE_MYSQL_USER,SAE_MYSQL_PASS);
	if(!$link){
		die('数据库连接失败！');
	}
	mysql_query('set names utf8');
	//mysql_query('use sente');
	mysql_select_db(SAE_MYSQL_DB);

	//链接标题
	$sql = 'select * from zpdt';
 	//执行SQL语句，获取结果集
 	$result = mysql_query($sql,$link);
 	//定义数组，用以保存信息
 	$zpdt = array();
 	//遍历结果集，获详细数据
 	while($row = mysql_fetch_assoc($result)){
 		$zpdt[] = $row;
 	}
	//链接内容
	 $id = isset($_GET['id']) ? $_GET['id'] : '';
	   if ($id=='')
     {
     	$sql='select a.*,b.fenle from zpdt_recruit a,zpdt b where a.flid=b.id  order by date desc';
     }
     else
     {
     	$sql="select a.*,b.fenle from zpdt_recruit a,zpdt b where a.flid=b.id and b.id=$flid order by date desc";
     }
	 $result = mysql_query($sql,$link);
	 $zpdt1 = array();
	while($row = mysql_fetch_assoc($result)){
 		$zpdt1[] = $row;
 	}
	//设置常量，用以判断视图文件是否由此文件加载
 	define('APP', 'sente');
 	//加载HTML模板文件，显示数据
 	require './recruit_htm.php';

	
	 ?>